<template>
  <div class="collectBox">
    <CollectType
      ref="CollectType"
      @selectStatus="selectStatus"
      @selectStatusAll="selectStatusAll"
      @selectType="selectType"
      @SearchInput="SearchInput"
      @ClassAll="ClassAll"
      @ClassTabClick="ClassTabClick"
      @TagAll="TagAll"
      @TagTabClisck="TagTabClisck"
      @AllAddCar="AllAddCar"
      @AllCancelCollection="AllCancelCollection"
    />
    <CollectList
      ref="collectList"
      @selectStatusAll="selectChildList"
      @AllRefreshPage="AllRefreshPage"
    />
  </div>
</template>
<script>
import CollectType from '../../components/focus/collect_type.vue';
import CollectList from '../../components/focus/collect_list.vue';
export default {
	components: {
		CollectType,
		CollectList,
	},
	data(){
		return{
			selectedAll:false,
		}
	},
	mounted() {
		// this.$refs.CollectType.getProductFavorites();
		// this.$refs.collectList.getProductFavorites();
	},
	methods:{
		// 全局刷新
		AllRefreshPage() {
			this.$refs.CollectType.AllRefreshPage()
		},
		//设置遮罩层
		selectStatus(val){
			this.$refs.collectList.showOverDiv(val);
		},
		//设置遮罩层全选
		selectStatusAll(status){
			this.$refs.collectList.selecteAll(status);
		},
		selectChildList(status){
			this.$refs.CollectType.selectStatus(status);
		},
		// 切换分类
		selectType(id){
			this.$refs.collectList.selectType(id);
		},
		// 搜索
		SearchInput(SearchInput) {
			this.$refs.collectList.SearchInput(SearchInput);
		},
		//分类筛选全部
		ClassAll(ClassAll) {
			this.$refs.collectList.ClassAll(ClassAll);
		},
		// 分类筛选
		ClassTabClick(ClassTabClick) {
			this.$refs.collectList.ClassTabClick(ClassTabClick);
		},
		// 标签筛选全部
		TagAll(TagAll) {
			this.$refs.collectList.TagAll(TagAll);
		},
		// 标签筛选
		TagTabClisck(TagTabClisck) {
			this.$refs.collectList.TagTabClisck(TagTabClisck);
		},
		// 批量加入购物车
		AllAddCar() {
			this.$refs.collectList.AllAddCar();
		},
		// 批量取消
		AllCancelCollection() {
			this.$refs.collectList.AllCancelCollection();
		}
	}
};
</script>

<style >

</style>
